1. Field of the Invention
The present invention relates to an image processing apparatus for executing processing of input image data and a control method thereof, and a program.
2. Description of the Related Art
An image input/output system which is connected on a network, executes image data processing for external or internal image data, and outputs the processed image data is known.
As this image data input/output system, a so-called MFP (Multi Function Peripheral) is available.
FIG. 20 shows a controller 100 which controls the conventional MFP. In the controller 100, a CPU 102, memory controller (MC) 103, general-purpose bus 105, image processor 110, and image data rasterizer (RIP) 113 are connected via a system bus bridge (SBB) 101. Note that “RIP” is short for Raster Image Processor.
A hard disk controller (HDDCont) 106 which controls a large-capacity storage unit (HDD (hard disk drive)) 107 that stores image data is connected to the general-purpose bus 105. Also, a network I/F 109 which serves as an interface used to transfer image data with external devices via a network 108, to which the MFP is connected, is connected to the general-purpose bus 105. The image data includes those in page vector formats (PDL (page description language), PDF, SVG, and the like).
The HDD (hard disk drive) 107 is connected to the HDDCont 106. The HDD 107 is used as a storage medium of image data. Likewise, a system memory (Memory) 104 is connected to the MC 103. The system memory 104 is used as a medium for temporarily storing image data. The system memory 104 generally comprises a DIMM.
A scanner 111 and printer 112 are connected to the image processor 110. The image processor 110 applies predetermined image processing to image data input from the scanner 111, and outputs the processed image data to the controller 100. The image processor 110 applies predetermined image processing to image data stored in the controller 100, and outputs the processed image data to the printer 112.
Image data to be handled by the controller 100 include those in the page vector format (PDL, PDF, SVG, or the like), which are exchanged with external devices via the network, and those in the raster data format, which are exchanged with the scanner 111 and printer 112. The CPU 102 interprets image data in the page vector format input from an external device into primitive objects to convert it into intermediate data (DL data) called a DL (DisplayList), and outputs the DL data to the RIP 113.
These image data are temporarily stored in the system memory 104 in the controller 100. For this reason, many kinds of data such as raster data, page vector data (PDL or the like), DL data, and the like are stored on the system memory 104.
The HDD 107 stores image data input from the scanner 111, and raster data rendered by the RIP 113 as image data.
The RIP 113 often uses a method of processing blocks with a predetermined size such as bands, tiles, or the like determined in advance as processing regions in place of pages. By setting this processing region as a block such as a band, tile, or the like, which is smaller than a page, the memory capacity required upon rasterizing image data in the RIP 113 can be advantageously reduced. Furthermore, by parallelly executing processing for respective blocks, the rasterize processing in the RIP 113 can be advantageously speeded up.
In the aforementioned image processing system, for example, a line or curve object which extends over a plurality of blocks in a page often exists. By roughly classifying the rasterize processing method in this case, two methods, that is, a method of extracting only portions of that object included in the respective blocks and rasterizing them, and a method of dividing the object into those for respective blocks in advance, and rasterizing them are available (Japanese Patent Laid-Open No. 2004-120639).
In the former method, as processing for each block, the RIP 113 rasterizes the object partway based on control point coordinates and attribute information of the object. The RIP 113 then checks if the object is included in each block. If the object is included in that block, the RIP 113 rasterizes only the included portion, thus ending the rasterize processing of the object in that block.
In the latter method, the control point coordinates and attribute information of the object are converted into those for respective blocks of the object, and are temporarily stored. After that, the RIP 113 rasterizes the object based on the control point coordinates and attribute information for each block, thus ending the rasterize processing of the object in that block.
Note that rasterize processing of line and curve objects mainly includes three types of processes: (1) an outline process for calculating the outline coordinates of the object, (2) a line width process for calculating coordinates separated by a predetermined distance from the outline, and (3) an end point process for calculating coordinates from the end points of the outline based on attribute information. With these processes, fill processing of the object is attained.
In the prior art, upon extracting and rasterizing only portions of line and curve objects included in blocks, it is effective to use a band or tile which has a relatively large processing unit. However, if too small a processing unit is used, the number of objects to be rasterized in respective blocks does not decrease, but the processing volume increases since the number of blocks to be processed increases. Therefore, it is difficult to further shorten the processing time and to reduce the storage capacity.
On the other hand, upon dividing line and curve objects into those for respective blocks and rasterizing these object in the prior art, the number of objects to be rasterized for respective blocks decreases. Hence, the processing time per unit block can be shortened. However, when an original object is divided into blocks, and each block is rasterized to a bitmap image, since each individual divided block is independently rasterized, a problem is posed.
That problem will be explained below taking FIG. 21 as an example.
Reference numeral 2001 denotes a part of page vector data, that is, a diagram based on an actually rasterized image. In this example, the page vector data 2001 has object data 2002 of a line segment. The object data 2002 is configured by vector data (illustrated as a white line in FIG. 21) designated with an instruction that connects initial and terminal point coordinates by a straight line, and a line width (that in a direction perpendicular to the white line) of that vector data. Assume that this page vector data 2001 is divided into block vector data 2003 and 2004.
The object data 2002 is divided into object data 2005 and 2006, which are respectively held in the block vector data 2003 and 2004. The block vector data 2003 and 2004 are independently rasterized using only the object data 2005 and 2006 included in themselves. For this reason, partial images in the original object data 2002 are omitted at the boundary between the blocks like the rasterized result, that is, raster data 2007 (first problem).
As another problem of a line object, a broken line object has attributes that designate line segment parts of the broken line, and blank parts of the line segments as its attribute values in some cases. When dividing page vector data having such a broken line object into block vector data, a blank part of the broken line deviates, as denoted by 12102 with respect to a desired output result 12101, as shown in FIG. 22 (second problem).
A case will be examined wherein page vector data of an object having a pattern whose color value gradually changes like a gradation pattern undergo conversion to block vector data.
Normally, a rendering instruction of gradation is expressed by the coordinate values of initial and terminal points, and a predetermined color value change amount. Upon dividing a gradation object in page vector data into block vector data, gradation is expressed by arranging a plurality of thin line segments having different color values.
According to this method, even when an object is divided, a gradation pattern can be expressed for respective block vector data. However, when the block vector data are re-used to restore page vector data, or when an edit operation is to be made for respective block vector data, the gradation pattern is segmented into blocks that are too small to restore the page vector data or to enable the edit operation (third problem).